<?php
/*
	
*/
defined('BY_JYA') or exit('Access Denied');
global $_RQ,$_AR;

$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
$return=array();
$basic=$this->plugin_setting('basic');
$return['banner']=$basic['image'];
$return['basic']=$basic;
//我的足迹
if($_RQ['op']=='main'){
	$sum=pdo_count('jy_kecheng_video_log',array('uniacid'=>$_SESSION['uniacid'],'mid'=>$_SESSION['uid']),'','createtime desc');
	$return['params']=array('keyword'=>'');
	$return['sum']=$sum;
	exi($return);

}
if($_RQ['op']=='getlist'){
	$params=array('uniacid'=>$_SESSION['uniacid'],'mid'=>$_SESSION['uid']);
	$pindex = max(1, intval($_RQ['page']));
	$psize = 10;
	$list=pdo_getslice('jy_kecheng_video_log',$params,array($pindex,$psize),$total,$fields,'','id desc');
	if($list){
		$sum=count($list);
		foreach($list as &$item){
			$video=pdo_get('jy_kecheng_video',array('uniacid'=>$_SESSION['uniacid'],'id'=>$item['video_id']),array('id','title','readnum','thumb'));
			$item=array_merge($item,$video);
			$item['createtime']=date('Y-m-d H:i:s',$item['createtime']);
			if($item['status']==0){
				$item['statustitle']='审核中';
			}elseif($item['status']==1){
				$item['statustitle']='审核通过';
			}else{
				$item['statustitle']='不通过';
			}
		}
	}
	else{
		$sum=0;
	}
	$return['list']=$list;
	exi($return);
}